package zhoufu.sz.sanxiao_check.ui.check;

import android.os.Bundle;
import android.support.annotation.Nullable;
import java.util.List;
import javax.inject.Inject;
import zhoufu.sz.sanxiao_check.inject.components.LoginComponet;
import zhoufu.sz.sanxiao_check.models.DangerModel;
import zhoufu.sz.sanxiao_check.presents.CheckItemPresenter;
import zhoufu.sz.sanxiao_check.ui.contract.CheckItemContract;
import zhoufu.sz.sanxiao_check.ui.fragment.BaseListFragment;

/**
 * User:RCP
 * email:ruancaipu@gmail.com
 * Date:2016/7/30
 * 检查条例
 */
public class CheckItemFragment extends BaseListFragment implements CheckItemContract.View
{
    private String SID;

    @Inject
    CheckItemPresenter _presenter;

    public static CheckItemFragment newInstance(String SID)
    {
        Bundle args = new Bundle();
        args.putString("SID", SID);
        CheckItemFragment fragment = new CheckItemFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override public void onCreate(@Nullable Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        if ( getArguments() != null )
        {
            SID = getArguments().getString("SID");
        }

    }

    @Override public void onActivityCreated(@Nullable Bundle savedInstanceState)
    {
        super.onActivityCreated(savedInstanceState);
        LoginComponet componet = getComponent(LoginComponet.class);
        componet.inject(this);
        _presenter.bindView(this);
    }

    @Override public void onStart()
    {
        super.onStart();
        _presenter.onStart();
    }

    @Override protected void initAdapter()
    {
    }

    @Override public String SID()
    {
        return SID;
    }

    @Override public void setData(List<DangerModel> list)
    {

    }
}
